<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="../css/bootstrap.css"/>
    <link rel="stylesheet" href="../css/examination.css">
    <script src="../js/JQuery%201.9.1.js"></script>
    <script src="../js/examinationtest.js"></script>
    <script src="../js/jquery.tmpl.min.js"></script>
    <script src="../js/ajax.js"></script>
    <script src="../js/bootstrap.js"></script>
    <script src="../js/yingSoftPopup.js"></script>
    <script src="../js/yingSoftPrg.js"></script>
    <script src="../js/yingSoftCookie.js"></script>
    <script src="../js/jquery.page.js"></script>
</head>
<body>
<div class="container" style="margin-top: 25px">
    <div style="margin-top:15px;margin-bottom:5px;">
        <ul class="nav nav-tabs nav-justified" style="width:30%"  id="ul-title">
            <li role="presentation" class="active" id="li_new"><a href="#">最新</a></li>
            <li role="presentation" id="li_upload"><a href="#" >已结束</a></li>
        </ul>
    </div>
    <div class="divider bg-yt" style="height: 3px"></div>
    <div class="panel panel-default">
        <div class="panel-body">
            <!-- 最新考试列表-->
            <div id="tab_new">
                <table class="table table-striped text-center" >
                    <thead>
                    <tr class="bg-yt">
                        <th class="text-center">考试名称</th>
                        <th class="text-center">开考时间</th>
                        <th class="text-center">结束时间</th>
                        <th class="text-center">状态</th>
                        <th class="text-center">操作</th>
                    </tr>
                    </thead>
                    <tbody id="newExam">

                    </tbody>
                </table>
                <div class="text-center message">

                </div>
                <nav class="text-center">
                    <ul class="pagination" >

                    </ul>
                </nav>
            </div>
            <!-- 最新考试列表end-->
            <!-- 已结束考试列表-->
            <div id="tab_end">
                <table class="table table-striped text-center">
                    <thead>
                    <tr class="bg-yt">
                        <th class="text-center">考试名称</th>
                        <th class="text-center">开考时间</th>
                        <th class="text-center">结束时间</th>
                        <th class="text-center">状态</th>
                        <th class="text-center">得分</th>
                        <th class="text-center">总分</th>
                        <th class="text-center">操作</th>
                    </tr>
                    </thead>
                    <tbody id="finishedExam">

                    </tbody>

                </table>
                <div class="text-center message">

                </div>
                <nav class="text-center">
                    <ul class="pagination">

                    </ul>
                </nav>
            </div>
            <!-- 已结束列表end-->
        </div>
    </div>
</div>
<!--最新考试填充模板-->
<script type="text/x-jquery-tmpl" id="newExamTmpl">
    <tr>
    <td class="examName">${examName}</td>
    <td>${beginTime}</td>
    <td>{{= endTime}}</td>
    <td class="hide examID">${examID}</td>
    <td class="hide num">${num}</td>
    <td>{{tmpl($data) '#examStatusTmpl'}}</td>
    <td>{{tmpl($data) '#testStatusTmpl'}}</td>
    </tr>
</script>
<!--最新考试填充模板end-->
<!--已结束考试填充模板-->
<script type="text/x-jquery-tmpl" id="finishedExamTmpl">
    <tr>
    <td class="hide examID">${examID}</td>
    <td class="hide num">${num}</td>
    <td class="text-center">${examName}</td>
    <td class="text-center">${beginTime}</td>
    <td class="text-center">{{= endTime}}</td>
    <td class="text-center">{{tmpl($data) '#examStatusTmpl'}}</td>
    <td class="text-center score">${score}</td>
    <td class="text-center allScore">${totalScore}</td>
    <td class="text-center">{{tmpl($data) '#testStatusTmpl'}}</td>
    </tr>
</script>
<!--已结束考试填充模板end-->
<!--考试状态填充模板-->
<script type="text/x-jquery-tmpl" id="examStatusTmpl">
    {{if status===0}}
    <span class="exam">尚未考试</span>
    {{else status===1}}
    <span class="examing">开始考试</span>
    {{else status===2}}
    <span class="evaluate">已交卷</span>
    {{else status===3}}
    <span class="exam">逾期未考</span>
    {{else status===4}}
    <span class="evaluate">等待评分</span>
    {{else status===5}}
    <span class="finishedExam">已经评分</span>
    {{/if}}
</script>
<!--考试状态填充模板end-->
<!--考试操作填充模板-->
<script type="text/x-jquery-tmpl" id="testStatusTmpl">
    {{if status===1}}
    <a class='startTest'>开始考试</a>
    {{else status===5}}
    <a class='checkScore'>查看成绩</a>
    {{else}}
    {{/if}}
</script>
<!--考试操作填充模板end-->
</body>
</html>
